﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using kp.compiler;
using kp.koordinator;
using kp.plotter;
using kp.rechenwerk;
using NUnit.Framework;

namespace integrationtest
{
    [TestFixture]
    public class IntegrateAll
    {
        [Test]
        public void Run()
        {
            var compiler = new Compiler();
            var rechenwerk = new Rechenwerk();
            var koordinator = new Koordinator(compiler, rechenwerk);

            var werte = koordinator.Berechne("2*x", 0, 1, 2).ToArray();

            Assert.AreEqual(2, werte.Length);
        }


        [Test, Explicit]
        public void Show()
        {
            var compiler = new Compiler();
            var rechenwerk = new Rechenwerk();
            var koordinator = new Koordinator(compiler, rechenwerk);
            var plotter = new Plotter();

            var portal = new Portal(koordinator, plotter);

            Application.Run(portal);
        }

        
        [Test, Explicit]
        public void Show_mit_Portalattrappe()
        {
            var compiler = new Compiler();
            var rechenwerk = new Rechenwerk();
            var koordinator = new Koordinator(compiler, rechenwerk);
            var plotter = new Plotter();

            var portal = new MockPortal(koordinator, plotter);

            Application.Run(portal);
        }
    }
}
